<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="./js/vue.js"></script>
    <script src="./filters/formatDate.js"></script>
</head>
<body>
    <div id="app">
        <p>{{ "app" | test("end") }}</p>
        <p>{{ day | formatDate("yyyy-MM-dd") }}</p>
    </div>
    <hr>
    <div id="root">
        <p>{{ "root" | test("end") }}</p>
        <p>{{ day | formatDate("yyyy-MM-dd") }}</p>
    </div>
</body>
<script>
    Vue.filter("test",function(target,arg){
        return target + ":" + arg;
    });
    new Vue({
        el:"#app",
        data:{
            day:new Date()
        }
    });
    new Vue({
        el:"#root",
        data:{
            day:new Date()
        },
        fillters:{
            test(target,arg){
                return arg+"="+target;
            }
        }
    })
</script>
</html>